package longcaisuyun.longcai.com.utils;

import com.zcx.helper.app.AppApplication;
import com.zcx.helper.app.AppPreferences;

public class MyPreferences extends AppPreferences{

	public MyPreferences(AppApplication context) {
		
		super(context, "hdq");
		
 	}
	
	public void saveIsAuto(boolean isAuto){
		
		putBoolean("is_auto", isAuto);
		
	}
	
	public boolean readIsAuto(){
		
		return getBoolean("is_auto", false);
		
	}
	
	public void saveUsername(String username){
		
		putString("username", username);
		
	}
	
	public String readUsername(){
		
		return getString("username", "");
		
	}
	
	public void saveMerchantname(String mername){
		
		putString("mername", mername);
	}
	
	public String readMerchantname(){
		
		return getString("mername", "");
		
	}
	
	public void saveCharityname(String chaname){
		
		putString("chaname", chaname);
	}
	
	public String readCharityname(){
		
		return getString("chaname", "");
		
	}
	
	public void savePassword(String password){
		
		putString("password", password);
		
	}
	
	public String readPassword(){
		
		return getString("password", "");
		
	}
	
	public void saveMpassword(String mpassword){
		
		putString("mpassword", mpassword);
		
	}
	
	public String readMpassword(){
		
		return getString("mpassword", "");
		
	}
	
	public void saveCpassword(String cpassword){
		
		putString("cpassword", cpassword);
		
	}
	
	public String readCpassword(){
		
		return getString("cpassword", "");
		
	}
	
	public void saveUid(String uid){
		
		putString("uid", uid);
		
	}
	
	public String readUid(){
		
		return getString("uid", "");
		
	}
	
	public void saveType(String type){
		
		putString("type", type);
		
	}
	
	public String readType(){
		
		return getString("type", "");
		
	}
	
	public void saveProvince(String prov){
		
		putString("prov", prov);
		
	}
	
	public String readProvince(){
		
		return getString("prov", "");
		
	}
	
	public void saveCity(String citys){
		
		putString("citys", citys);
		
	}
	
	public String readCity(){
		
		return getString("citys", "");
		
	}
	
	public void saveInstall(int count){
		
		putInt("count", ++count);
		
	}
	
	public int readInstall(){
		
		return getInt("count", 0);
		
	}
	
	public void saveProvinceId(String provid){
		
		putString("provid", provid);
		
	}
	
	public String readProvinceId(){
		
		return getString("provid", "");
		
	}
	
	public void saveCityId(String citysid){
		
		putString("citysid", citysid);
		
	}
	
	public String readCityId(){
		
		return getString("citysid", "");
		
	}
	
	public void saveStatus(String status){
		
		putString("status", status);
		
	}
	
	public String readStatus(){
		
		return getString("status", "");
		
	}
	
	public void saveTimeTtpe(String timetype){
		
		putString("timetype", timetype);
		
	}
	
	public String readTimeTtpe(){
		
		return getString("timetype", "");
		
	}
	
	public void saveStartTime(String startt){
		
		putString("startt", startt);
		
	}
	
	public String readStartTime(){
		
		return getString("startt", "");
		
	}
	
	public void saveEndTime(String endt){
		
		putString("endt", endt);
		
	}
	
	public String readEndTime(){
		
		return getString("endt", "");
		
	}
	
	public void savePnumId(String pnumId){
		
		putString("pnumId", pnumId);
		
	}
	
	public String readPnumId(){
		
		return getString("pnumId", "");
		
	}
	
	public void saveAgeId(String ageId){
		
		putString("ageId", ageId);
		
	}
	
	public String readAgeId(){
		
		return getString("ageId", "");
		
	}
	
	public void saveIntent(String intent){
		
		putString("intent", intent);
		
	}
	
	public String readIntent(){
		
		return getString("intent", "");
		
	}
	
	public void saveAreaId(String areaId){
		
		putString("areaId", areaId);
		
	}
	
	public String readAreaId(){
		
		return getString("areaId", "");
		
	}
	
	public void saveFilterType(String filter){
		
		putString("filter", filter);
		
	}
	
	public String readFilterType(){
		
		return getString("filter", "");
		
	}
	//抢单提示
	public void saveTiShi(boolean filter){

		putBoolean("tishi", filter);

	}

	public boolean readTiShi(){

		return getBoolean("tishi", true);

	}
	public void savePreferencesId(String preId){
		
		putString("preId", preId);
		
	}
	
	public String readPreferencesId(){
		
		return getString("preId", "");
		
	}
	
	public void saveTipOffId(String tipId){
		
		putString("tipId", tipId);
		
	}
	
	public String readTipOffId(){
		
		return getString("tipId", "");
		
	}

	public void saveCarId(String carid){

		putString("carid", carid);

	}

	public String readCarId(){

		return getString("carid", "");

	}

	public void saveCityid(String cityid){

		putString("cityid", cityid);

	}

	public String readCityid(){

		return getString("cityid", "");

	}

	public void savejuli(String juli){

		putString("juli", juli);

	}

	public String readjuli(){

		return getString("juli", "");

	}

	//定位的地址
	public String readAddress(){
		return getString("address","");
	}
	public void saveAddress(String address){
		putString("address",address);
	}
	//电话号
	public String readMobile(){
		return getString("mobile","");
	}
	public void saveMobile(String mobile){
		putString("mobile",mobile);
	}
	public void clearAll(){
		
		saveIsAuto(false);
		saveUsername("");
		saveMerchantname("");
		saveCharityname("");
		savePassword("");
		saveAgeId("");
		saveMpassword("");
		saveCpassword("");
		saveUid("");
		saveType("");
		saveProvince("");
		saveCity("");
		saveInstall(1);
		saveProvinceId("");
		saveCityId("");
		saveStatus("");
		saveTimeTtpe("");
		saveStartTime("");
		saveEndTime("");
		savePnumId("");
		saveAgeId("");
		saveIntent("");
		saveMobile("");
		saveTiShi(true);
	}
	
}
